package com.aegean.MonitorExamSYS.center.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.aegean.MonitorExamSYS.center.business.CenterBusiness;
import com.aegean.MonitorExaxSYS.model.BigType;
import com.opensymphony.xwork2.ActionSupport;

@Controller("BigTypeAction")
@Scope("prototype")
public class BigTypeAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Resource
	CenterBusiness business;
	private List<BigType> bigtypes;
	private int total;
	private int start;
	private int limit;
	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

	public List<BigType> getBigtypes() {
		return bigtypes;
	}

	public void setBigtypes(List<BigType> bigtypes) {
		this.bigtypes = bigtypes;
	}

	public String show() throws Exception {
			total=business.searchBigTypeCount();
			bigtypes=business.searchPartBigTypes(start, limit);
			return SUCCESS;
		}
}
